| Server IP : 151.101.66.159 / Your IP : 216.73.216.66 Web Server : Flywheel/5.1.0 System : Linux wordpress 6.12.113+ #1 SMP Thu Oct 22 02:38:20 UTC 2026 x86_64 User : root ( ) PHP Version : 7.4.33.18 Disable Function : disk_free_space,diskfreespace,dl,exec,fpassthru,getmypid,getmyuid,highlight_file,link,opcache_compile_file,opcache_get_configuration,opcache_is_script_cached,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifcontinued,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,phpinfo,popen,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,show_source,socket_listen,source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wp-content/plugins/wpmudev-updates/assets/src/js/admin/ |
Upload File : |
;// noinspection JSUnusedLocalSymbols
(function ($, window, document, undefined) {
"use strict";
// Create the defaults once
var pluginName = "wpmudevDashboardAdminCommon";
// The actual plugin constructor
function wpmudevDashboardAdminCommon(element, options) {
this.element = element;
this.$el = $(this.element);
this.init();
}
// Avoid Plugin.prototype conflicts
$.extend(wpmudevDashboardAdminCommon.prototype, {
init: function () {
this.showAlertNotice();
this.showUpgradeHighlightsModal();
this.initSelectSearch();
},
showAlertNotice() {
var container = $( '.sui-common-notice-alert' ),
noticeID = '',
message = '',
noticeOptions = {};
if ( ! container.length ) {
return;
}
noticeOptions.dismiss = {};
noticeOptions.autoclose = {};
noticeOptions.type = container.data( 'notice-type' );
noticeOptions.dismiss.show = container.data( 'show-dismiss' );
noticeOptions.autoclose.show = false;
message = container.data( 'notice-msg' );
noticeID = container.attr( 'id' );
if ( 'success' === noticeOptions.type ) {
noticeOptions.icon = 'check-tick';
}
SUI.openNotice( noticeID, message, noticeOptions );
},
/**
* Show upgrade highlights modal.
*
* If modal is available, open it.
*
* @since 4.11
*/
showUpgradeHighlightsModal() {
// Get the modal element.
var modal = $('#upgrade-highlights');
if (modal.length > 0) {
// Open the modal.
SUI.openModal('upgrade-highlights', 'wpmudev-dashboard-header', null, true, false);
// On close button click.
modal.find('.modal-close-button').on('click', function () {
var data = {
action: 'wdp-dismiss-highlights',
hash: $('#highlight_modal_hash').val(),
};
// Send request.
$.post(window.ajaxurl, data);
});
}
},
/**
* Initialize search input.
*
* @since 4.0
* @since 4.11 Enabled for multiple inputs.
*/
initSelectSearch: function () {
var self = this;
this.$el.find('.wpmudev-search').each(function(){
var search = $(this);
var hash = search.data('hash');
var searchAction = search.data('search-action');
var searchParent = search.data('search-parent');
var languageSearching = search.data('language-searching');
var languageNoresults = search.data('language-noresults');
var languageErrorLoading = search.data('language-error-load');
var languageInputTooShort = search.data('language-input-tooshort');
var languageInputTooShort = search.data('language-input-tooshort');
search.SUIselect2({
dropdownCssClass: 'sui-select-dropdown',
dropdownParent: searchParent ? self.$el.find('#' + searchParent) : null,
ajax: {
url: window.ajaxurl,
type: "POST",
data: function (params) {
return {
action: searchAction,
hash: hash,
q: params.term,
};
},
processResults: function (data) {
return {
results: data.data
};
},
},
templateResult: function (result) {
if (typeof result.id !== 'undefined' && typeof result.label !== 'undefined') {
return $(result.label);
}
return result.text;
},
templateSelection: function (result) {
return result.display || result.text;
},
language: {
searching: function () {
return languageSearching;
},
noResults: function () {
return languageNoresults;
},
errorLoading: function () {
return languageErrorLoading;
},
inputTooShort: function () {
return languageInputTooShort;
},
}
});
});
},
});
// A really lightweight plugin wrapper around the constructor,
// preventing against multiple instantiations
$.fn[pluginName] = function (options) {
return this.each(function () {
if (!$.data(this, pluginName)) {
$.data(this, pluginName, new wpmudevDashboardAdminCommon(this, options));
}
});
};
})(jQuery, window, document);